home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1994 November / macformat-018.iso / Utility Spectacular / Developer / macgzip_022-src / macos / Posix / ThinkCPosix Sources / mktemp.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-07-26  |  280 b   |  17 lines  |  [TEXT/MPS ]

  1. /* $Id: $ */
  2.  
  3. /*
  4.  * This presently overwrites the contents of template.
  5.  */
  6.  
  7. #include "ThinkCPosix.h"
  8.  
  9. char *mktemp(char *template)
  10. {
  11.     if (template == NULL || strlen(template) < 8) {
  12.         fprintf(stderr, "mktemp: template too short\n");
  13.         return NULL;
  14.     }
  15.     return tmpnam(template);
  16. }
  17.